﻿<%@ Page Title="首页" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="HomeIndex.aspx.cs" Inherits="Xpus.YouYTube.WebSite.Views.Home.HomeIndex" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% TVideo[] newVideos = (TVideo[])ViewData["NewVideos"]; %>
<div class="box">
	<div class="bt">最新视频</div>
	<div class="bc">
<% for (int i = 0; i < newVideos.Length; i++) %>
<% { %>
	<% if (i == 10) %>
	<% { %>
		<div class="ad-c">
<script type="text/javascript"><!--
google_ad_client = "pub-0410788977836329";
/* 468x60, 创建于 08-6-5,yyt，首页栏目间 */
google_ad_slot = "2133264878";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
		</div>
		<hr />
	<% } %>

		<% TVideo v = newVideos[i]; %>
		<h2 class="VideoTitle"><a href="/Video/View/<%= v.Id %>/"><%= HttpUtility.HtmlEncode(v.Title) %></a></h2>
		<p class="des"><%= HttpUtility.HtmlEncode(v.Description.LimitLength(200)) %></p>
		<p class="cmd">[<%= v.AddedTime.ToString("yyyy-MM-dd HH:mm:ss") %>] <%= v.AgreeNumber %>顶 <%= v.DisagreeNumber %>踩</p>
		<hr />
<% } %>
		<p class="cmd-r"><a href="/Video/List/ByTime/2/">更多视频</a></p>
	</div>
</div>
</asp:Content>
